package com.atguigu.controller;

import com.atguigu.utils.ViewBaseServlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * projectName: javaweb
 *
 * @author: 赵伟风
 * time: 2022/7/4 11:32 周一
 * description: 程序的欢迎默认资源地址
 *
 * TODO: 访问项目根路径，默认就是访问项目下的 index.html / index.jsp资源
 *       将动态资源可以设置成index.html伪装成欢迎资源，
 *       具体目标页面，自行转发即可！
 */
@WebServlet("/index.html")
public class IndexController extends ViewBaseServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        System.out.println("IndexController.service");

        //跳转到登录页面
        processTemplate("login",req,resp);
    }

}
